#ifndef ENEMY_H
#define ENEMY_H

#include "NpcItem.h"
#include "CIBeAttackInterface.h"
#include "CDamageType.h"

class cEnemy : public NpcItem, public CIBeAttackInterface
{
public:
	cEnemy(int _x,int _y);
	void update();
	void MakeMyWalk();
	void die();
	//DEFINED IN EVERY SINGLE ENEMY
	virtual void headbang() = 0;
	virtual void draw() = 0;
	virtual bool init()
	{
		return true;
	}

	virtual void move(float dt, cPlayer* mario) = 0;

	virtual void itemCollision(cPlayer* mario, std::vector<NpcItem *> &items)
	{

	}

	virtual void collisionWithOthers(NpcItem* sprite)
	{

	}
    virtual bool couldCollisionWithOthers()
    {
       return false;
    }
	virtual SDL_Rect& GetItemRect();
	virtual float TakeDamage(float DamageAmount, struct CDamageEvent const& DamageEvent, NpcItem* DamageCauser);
	virtual void BeAttacked(float fDamage);
	int playerTouchRight(cPlayer* mario);
	int playerTouchLeft(cPlayer* mario);
	int scoring;
	int H,W,dir,speed;
	bool down_touch,left_touch,right_touch,dead;
	bool dying;
	float y_speed;
	int x,y,DEATHcount;
	int walkcount,walkcount2,walkadd;
};

//LOADING IMAGE
void initSPINY();
void initCANNON();
void initBRETT();
void initGOOMBAbig();

class cGoombaBig : public cEnemy
{
public:
	cGoombaBig(int x,int y);
	virtual void move(float dt, cPlayer* mario);
	virtual void headbang();
	virtual void draw();
};
class cSpiny : public cEnemy
{
public:
	cSpiny(int x,int y);
	virtual void move(float dt, cPlayer* mario);
	virtual void headbang();
	virtual void draw();
};

class cTurtleFly : public cEnemy
{
public:
	cTurtleFly(int x,int y);
	virtual void move(float dt, cPlayer* mario);
	virtual void headbang();
	virtual void draw();
	int count;
};

class cFireCircle
{
public:
	cFireCircle(int _x,int _y,int _size);

	void update();
	int x,y,size;
	float dir_x,dir_y,angle;
	SDL_Rect rect;
	float counta2;
};

class cCannon
{
public:
	cCannon(int _x,int _y);

	void update();
	int x,y;
	int count;
	int bullet_x,bullet_y;
	int dir,die;
	bool updating;
};

class cBrett
{
public:
	cBrett(int _x,int _y);

	void update();
	int x,y;
	int count;
	int dir;
};

#endif